package com.cj.td.screen.actor;

import org.loon.framework.android.game.action.sprite.StatusBar;
import org.loon.framework.android.game.core.graphics.component.Actor;
import org.loon.framework.android.game.core.graphics.component.ActorLayer;
import org.loon.framework.android.game.core.graphics.opengl.GLEx;

public class Enemy extends Actor {
	
	private int startX,startY;
	
	private int endX,endY;
	
	private int speed,hp;
	
	private boolean removeFlag;
	
	protected StatusBar hpBar;
	
	public Enemy(String fileName,int sx,int sy,int ex,int ey
			,int speed,int hp){
		this.setDelay(300);
		this.setImage(fileName);
		this.hpBar = new StatusBar(hp, hp, (this.getWidth()-25)/2
				, this.getHeight()+5, 25, 5);
		this.startX = sx;
		this.startY = sy;
		this.endX = ex;
		this.endY = ey;
		this.speed = speed;
		this.hp = hp;
	}

	@Override
	public void draw(GLEx g) {
		//绘制精灵
		hpBar.createUI(g);
	}

	@Override
	public void action(long elapsedTime) {
		
	}

	@Override
	protected void addLayer(ActorLayer gameLayer) {
		// TODO Auto-generated method stub
		super.addLayer(gameLayer);
	}

}
